<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla controller library
jimport('joomla.application.component.controller');
 
/**
 * Hello World Component Controller
 */
class ComsldrController extends JControllerLegacy
{
	function __construct($config = array())
    {
		parent::__construct($config);
    }
	function comsldr(){
		JRequest::setVar('view', 'comsldr');
		$model = $this->getModel( 'comsldr' );
		$this->display();
	}
    function chitiet()
    {
		$model = $this->getModel( 'comsldr' );
		$app = JFactory::getApplication();
		$this->document = JFactory::getDocument();
		
		$catID = JRequest::getVar('catid',0);
		// $catID = $model->getCatID();
		
		
		$data['items'] = $model->getItems($catID);
		

		$sitename = $app->getCfg('sitename');
		$title = $this->document->getTitle();
				
		
		JRequest::setVar('view', 'chitiet');

		$data['sitename'] = $sitename;
		$data['title'] = $title;
		
		JRequest::setVar('data',$data);
		$this->display();
    }
}